Using GitHub Copilot with Python
Step 1: Add a Pydantic model
Create a Pydantic model so that I can use it in a new route that will accept JSON with text as a key which accepts a string.
Step 2: Generate a new endpoint
Create a FastAPI endpoint that accepts a POST request with a JSON body containing a single field called "text" and returns a checksum of the text
Step 3: Explain code
Explain This
Step 4: Using Slash Commands
/doc
/doc I need to document the routes for these API Routes. Help me produce documentation I can put in the README.md file of this project
/tests
/tests help me write a test for the generate() route using the FastAPI test client and the Pytest framework. Help me understand where I should put the test file, how to add the Pytest dependency to my project, and how to run the tests
@workspace I want to provide instructions on how to run this application using the uvicorn webserver, I also need to provide instructions on how to install the dependencies properly and what are some characteristics of the FastAPI framework. I will use this to improve the README.md file